home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / Talking Telnet / source / Headers / globaldefs.h < prev    next >
Text File  |  1996-06-22  |  4KB  |  143 lines

  1. /*
  2. *    globaldefs.h
  3. *    Defines we only want to define once...
  4. *
  5. *****************************************************************************
  6. *       NCSA Telnet for the Macintosh                                        *
  7. *                                                                            *
  8. *        National Center for Supercomputing Applications                        *
  9. *        152 Computing Applications Building                                    *
  10. *        605 E. Springfield Ave.                                                *
  11. *        Champaign, IL  61820                                                *
  12. *                                                                            *
  13. *        Copyright (c) 1992, Board of Trustees of the University of Illinois    *
  14. *                                                                            *
  15. *****************************************************************************
  16. *  Revisions:
  17. *  7/92        Telnet 2.6:    Initial version.  Jim Browne
  18. */
  19.  
  20. /*    Operation Governing Defines: */
  21. #define    MaxSess        20        /* The maximum number of sessions */
  22. #define    MaxGraph    30        /* Maximum number of graphics */
  23. #define NPORTS        30
  24. #define MAXVG        20        /* maximum number of VG windows */
  25. #define NEVENTS        50
  26.  
  27. /*    The two TEK devices (window and picture) */
  28. #define    TEK_DEVICE_WINDOW    0
  29. #define    TEK_DEVICE_PICTURE    1
  30.  
  31. /*    Possible values for windowKind */
  32. #define    WIN_MODELESS    userKind+1        // Modeless windows
  33. #define    WIN_CONSOLE        userKind+2        // Console window
  34. #define    WIN_LOG            userKind+3        // FTP log window
  35. #define    WIN_CNXN        userKind+4        // Connections
  36. #define    WIN_TEK            userKind+5        // TEK windows
  37. #define    WIN_ICRG        userKind+6        // Interactive Color Raster Graphics windows
  38.  
  39. /*    Emulation type defines */
  40. #define VTEKTYPE    1
  41. #define TEKTYPE        2
  42. #define DUMBTYPE    3
  43. #define RASTYPE        4
  44.  
  45. /*    Font Height and width constants */
  46. #define DefFONT        4
  47. #define DefSIZE        9
  48.  
  49. /*    ASCII character set defines */
  50. #define ESC            0x1b    /* the escape character */
  51. #define    BS            0x08    /* the backspace character */
  52. #define DEL            0x7f    /* the delete character */
  53. #define CR            0x0d    /* the carriage return character */
  54. #define LF            0x0a    /* the line feed character */
  55.  
  56.  
  57. /* Now for some event stuff */
  58. #define    BScode        51        /* This is the Keycode for Backspace */
  59. #define KPlowest    65        /* This is the last code before the KP */
  60. #define switchEvt     1        /* Switching event (suspend/resume )  for app4evt */
  61.  
  62. /* These next three keep track of the screen windows */
  63. #define NO_WINDOW    0
  64. #define DEC_WINDOW    1
  65. #define TEK_WINDOW    2
  66.  
  67. #define NUMCURS        7
  68. #define gincurs        0
  69. #define xfercurs    1
  70. #define normcurs    2
  71. #define textcurs    3
  72. #define poscurs        4
  73. #define watchcurs    5
  74. #define graphcurs    6
  75.  
  76. #define kInFront    (WindowPtr) -1
  77.  
  78. /* ===================================================================================*/
  79. struct TelInfoRec {
  80. short 
  81.     setdir,
  82.     SettingsFile,    /* The Resource Reference Number of the Settings file */
  83.     ApplicationFile,    // The Resource Reference Number of the Application file
  84.     MacBinary,        // Alternate instance that can allow us to change MB state w/o
  85.                     //    changing the actual preference value
  86.     ScrlLock,        /* Are we in network suspend mode */
  87.     ftplogon,        /* Is ftp log visible (default no) */
  88.     done,            /* Are we done yet 0=not */
  89.     numwindows,        /* Number of active window structures (note: not windows ) */
  90.     ginon,            /* True if we are in GIN mode */
  91.     xferon,            /* Is a transfer in progress */
  92.     graphs,            /* How many detached graphs do we have */
  93.     debug,            /* Flag for debugging 1=active */
  94.     myfronttype,    /* what kinda window is the front one */
  95.     suspended,        //are we backgrounded
  96.     isQuerty;        //do we have a querty layout
  97. short
  98.     CONFstate,        /* ...for parsing config files */
  99.     CONFactive,
  100.     position,        /* the next three are state variables for config.tel parsing */
  101.     inquote,
  102.     lineno;           /* state vars */    
  103.  
  104. long
  105.     oldgraph[MaxGraph],    /* Storage for old Graph numbers */
  106.     myfrontvs,        /* what is the VS # of the window */
  107.     blinktime;
  108.             
  109. Rect
  110.     screenRect,        /* The whole screen */
  111.     dragRect;        /* Where it is legal to drag ourselves */
  112. RgnHandle 
  113.     greyRegion;        //all monitors together
  114. WindowPeek
  115.     myfrontwindow;    /* window pointer for changing the pointer */
  116.  
  117. RgnHandle
  118.     myfrontRgn;        /* Handle to the region of the window to scope for stuff */
  119.  
  120. Cursor
  121.     *lastCursor;
  122.  
  123. FSSpec
  124.     ApFolder, SysFolder, PrefFolder;
  125.  
  126. short    
  127.     DefaultDirVRefNum,
  128.     FTPClientVRefNum; 
  129.  
  130. long
  131.     DefaultDirDirID,
  132.     FTPClientDirID;
  133. PaletteHandle
  134.     AnsiColors;        //The Global ANSI Color palette
  135. Boolean 
  136.     haveColorQuickDraw;
  137. };
  138.  
  139. typedef struct TelInfoRec TelInfoRec;
  140.  
  141. #ifndef GLOBALMASTER
  142. extern TelInfoRec *TelInfo;         /* all the globals related to Telnet internals */
  143. #endif